package com.trt.bo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class VlogBO {

    private String id;
    private String vlogerId;

    @NotBlank(message = "视频播放地址不能为空")
    //@Pattern(regexp="^([hH][tT]{2}[pP]:/*|[hH][tT]{2}[pP][sS]:/*|[fF][tT][pP]:/*)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\\\/])+(\\\\?{0,1}(([A-Za-z0-9-~]+\\\\={0,1})([A-Za-z0-9-~]*)\\\\&{0,1})*)$")
    private String url; // url是否正确的url（提示：正则表达式）

    @NotBlank(message = "视频封面不能为空")
    private String cover;

    @NotBlank(message = "视频标题不能为空")
    private String title;

    @NotBlank(message = "视频width不能为空")
    private Integer width;

    @NotBlank(message = "视频height不能为空")
    private Integer height;

    private Integer likeCounts;
    private Integer commentsCounts;


}